home *** CD-ROM | disk | FTP | other *** search
- /*
- * You may freely copy, distribute and reuse the code
- * in this example. Scott Anguish disclaims any warranty of
- * any kind, expressed or implied, as to its fitness
- * for any particular use.
- * Please keep this notice intact
- * Written by: Scott Anguish sanguish@digifix.com
- */
-
- #import "MMFolderCell.h"
-
- #import <libc.h> /* MAXPATHLEN */
- #import <stdio.h>
- #import <strings.h>
-
- #import <appkit/appkit.h>
-
- #import <streams/streams.h>
-
-
- @implementation MMFolderCell:MMCell
-
- - imageFromFilename:(const char *)filename
- {
- if (!theImage)
- {
- theImage=[[Application workspace] getIconForFile:filename];
- if (!theImage){
- theImage = [[NXImage alloc] initFromFile: "/usr/lib/nib/folder_nib.tiff" ];
- }
- } return self;
-
- }
-
- - imageFromAttachment
- {
-
- char filename[MAXPATHLEN+1];
-
- sprintf(filename,"/tmp/%s",attachmentName);
- [self imageFromFilename:filename];
- return self;
- }
-
-
- @end
-